{% extends 'Base/main.content.lists.div.html.twig' %}{% import 'Base/list_item.twig' as listItem %}

{% import 'Base/list_item.twig' as listItem %}
{% block options %}
    <div class="menu-list">
        {#{{ dump(tools) }}#}
        {% for key , classes in tools %}
            {% set default = "请选择分类" %}
            {% set classes = classes %}
            <div class="rule-single-select">
                <select name="cond[{{ key }}]" onchange="javascript:__doPostBack('searchCond','')" >
                    <option value="" {{app.request.get("cond")[key] is defined and app.request.get("cond")[key] == "" ? ' selected="selected"' : "" }} >{{ default }}</option>
                    {% for class in classes %}
                        <option value="{{ class.id }}"
                                {{app.request.get("cond")[key] is defined and  app.request.get("cond")[key] == class.id ? ' selected="selected"' : "" }}
                        >{{ class.name }}</option>
                    {% endfor %}
                </select>
            </div>
        {% endfor %}
    </div>
{% endblock %}
{% block tableHead %}
    <tr>
        <th align="" width="">选择</th>
        <th align="" width="">名称</th>
        <th align="" width="">等级</th>
        <th align="" width="">orders</th>
        <th align="" width="">上级</th>
        <th align="" width="">图片</th>
        <th align="" width="">info</th>
        <th align="" width="">操作</th>
    </tr>
{% endblock %}
{% block tableList %}
    {% for Entity in lists %}
        <tr>
            <td align='' width=''>
                <span class="checkall"><input lay-skin="primary" type="checkbox" name="ids[]" value="{{ Entity.UserGroups_id }}"/></span>
            </td>
            <td align='' width='' id='name_{{ Entity.UserGroups_id }}'>
                {{ listItem.text('name',Entity.UserGroups_name,Entity.UserGroups_id) }}
            </td>
            <td align='' width='' id='level_{{ Entity.UserGroups_id }}'>
                {{ listItem.text('level',Entity.UserGroups_level,Entity.UserGroups_id) }}
            </td>
            <td align='' width='' id='orders_{{ Entity.UserGroups_id }}'>
                {{ listItem.text('orders',Entity.UserGroups_orders,Entity.UserGroups_id) }}
            </td>
            <td align='' width='' id='parent_{{ Entity.UserGroups_id }}'>
                {{ listItem.text('parent',Entity.UserGroups_parent,Entity.UserGroups_id) }}
            </td>
            <td align='' width='' id='pic_{{ Entity.UserGroups_id }}'>
                {{ listItem.pic('pic',Entity.UserGroups_pic,Entity.UserGroups_id) }}
            </td>
            <td align='' width='' id='info_{{ Entity.UserGroups_id }}'>
                {{ listItem.text('info',Entity.UserGroups_info,Entity.UserGroups_id) }}
            </td>
            <td align='' width=''>
                {{ listItem.manage('UserGroups','',Entity.UserGroups_id) }}
            </td>
        </tr>
    {% endfor %}
{% endblock %}
{% block script %}
{% endblock %}

